import {Button, Modal} from 'antd';

class WindowButton extends React.Component{


	constructor(props) {
		super(props);
		this.state = { visible: false }
    }

	handle = () => {
		const {detailRecordId,requestid} = this.props;
		//const w = window.open('about:blank');
		// let url = "/workflow/search/WFCustomSearchMiddleHandler.jsp?offical=&officalType=-1&fromleftmenu=-1&typeid=&workflowid="+
		// 	"&_isFromShowRelatedProcess=1"+
		// 	"&_borrowDetailRecordId="+detailRecordId+
		// 	"&_borrowRequestid="+requestid;

		let url = "/spa/workflow/index_mobx.jsp#/main/workflow/queryFlowResult?needTree=false&fromwhere=urlFilter&cus_isFromShowRelatedProcess=1"+
			"&cus_borrowDetailRecordId="+detailRecordId+
			"&cus_borrowRequestid="+requestid;

		//w.location.href = url;
		window.open(url);
	}

    render(){
    	return(
		   	<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ee7jd3`} onClick={this.handle}>查 看</Button>
    	);

    }   
}

export default WindowButton